<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./TemplateLogin.xhtml">

            <ui:define name="top">
                <p:panel header="Bienbenidos a Biblioteca ITS" style="zoom: 3"/>
            </ui:define>

            <ui:define name="left">
                
            </ui:define>

            <ui:define name="right">
          
            </ui:define>

            <ui:define name="content">
                <center>
                    <p:panel header="Login">
                        <h:form>
                            <p:growl/>
                            <p:panelGrid columns="2">
                                <p:outputLabel value="Usuario: " for="usuario"/><br/>
                                <p:inputText id="usuario" value="#{accessBean.name}" validatorMessage="Sobrepasa el numero de caracteres o no esta registrado">
                                    <f:validateRegex pattern="[A-Z][a-z]{4,45}"/>
                                </p:inputText><br/>
                                <p:outputLabel value="Password: " for="pass"/><br/>
                                <p:password id="pass" value="#{accessBean.pass}" validatorMessage="Clave de 8 dig solo numerico" >
                                    <f:validateRegex pattern="[0-9]{8}"/>
                                </p:password>
                            </p:panelGrid>
                            <p:commandButton action="#{accessBean.validarLogin}" value ="Acceder"/>
                        </h:form>
                    </p:panel>
                </center>
            </ui:define>

        </ui:composition>

    </body>
</html>
